Completely untested, might not even build.
#mesondefine GDK_WINDOWING_X11
#mesondefine GDK_WINDOWING_BROADWAY
#mesondefine GDK_WINDOWING_WAYLAND
+#mesondefine GDK_WINDOWING_MIR
#mesondefine GDK_RENDERING_VULKAN
gdkconfig_cdata.set('GDK_WINDOWING_X11', x11_enabled)
gdkconfig_cdata.set('GDK_WINDOWING_WAYLAND', wayland_enabled)
gdkconfig_cdata.set('GDK_WINDOWING_BROADWAY', broadway_enabled)
+gdkconfig_cdata.set('GDK_WINDOWING_MIR', mir_enabled)
gdkconfig_cdata.set('GDK_RENDERING_VULKAN', have_vulkan)
gdkconfig = configure_file(
endif
gdk_backends = []
-foreach backend : ['broadway', 'wayland', 'x11']
+foreach backend : ['broadway', 'wayland', 'x11', 'mir']
if get_variable('@0@_enabled'.format(backend))
subdir(backend)
gdk_deps += get_variable('gdk_@0@_deps'.format(backend))
--- /dev/null
+gdk_mir_sources = files([
+ 'gdkmircursor.c',
+ 'gdkmirdevicemanager.c',
+ 'gdkmirdisplay.c',
+ 'gdkmireventsource.c',
+ 'gdkmirglcontext.c',
+ 'gdkmirkeyboard.c',
+ 'gdkmirkeymap.c',
+ 'gdkmirpointer.c',
+ 'gdkmirscreen.c',
+ 'gdkmirwindow.c',
+ 'gdkmirwindowimpl.c',
+ 'gdkmir-debug.c',
+])
+
+#gdk_mir_public_headers = []
+#install_headers(gdk_mir_public_headers, subdir: 'gtk-4.0/gdk/mir/')
+
+install_headers('gdkmir.h', subdir: 'gtk-4.0/gdk/')
+
+gdk_mir_deps = [
+ mirclient_dep,
+ mircookie_dep,
+ libcontent_hub_glib_dep,
+]
+
+libgdk_mir = static_library('libgdk-mir',
+ gdk_mir_sources, gdkconfig, gdkenum_h,
+ include_directories: [confinc, gdkinc],
+ c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"'],
+ dependencies: [gdk_deps, gdk_mir_deps])
x11_enabled = get_option('enable-x11-backend')
wayland_enabled = get_option('enable-wayland-backend')
broadway_enabled = get_option('enable-broadway-backend')
-
+mir_enabled = get_option('enable-mir-backend')
mkmarshal = find_program('build_marshal.py')
glib_marshal = find_program('glib-genmarshal')
endif
endif
+if mir_enabled
+ mirclient_dep = dependency('mirclient', version : '>= 0.22.0')
+ mircookie_dep = dependency('mircookie', version : '>= 0.17.0')
+ libcontent_hub_glib_dep = dependency('libcontenthub-glib')
+endif
+
mlib = cc.find_library('m', required: false)
if giounix_dep.found()
-option('enable-x11-backend', type: 'boolean', value: 'true')
-option('enable-wayland-backend', type: 'boolean', value: 'true')
-option('enable-broadway-backend', type: 'boolean', value: 'false')
-option('enable-vulkan', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
+option('enable-x11-backend', type: 'boolean', value: 'true',
+ description : 'Enable the X11 gdk backend')
+option('enable-wayland-backend', type: 'boolean', value: 'true',
+ description : 'Enable the wayland gdk backend')
+option('enable-broadway-backend', type: 'boolean', value: 'false',
+ description : 'Enable the broadway (HTML5) gdk backend')
+option('enable-mir-backend', type: 'boolean', value: 'false',
+ description : 'Enable the Mir gdk backend (UNTESTED, NEEDS WORK)')
+option('enable-vulkan', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+ description : 'Enable support for the Vulkan graphics API')